/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2024-05-18
 * Time: 19:19
 */
public class Test {

//    public void a() {
//        System.out.println("123");
//    }

//    public void b() {
//        a();
//        System.out.println("456");
//    }
    public static void main1(String[] args) {
//        Dog dog = new Dog();//实例化
//        System.out.println(dog.name);
//        System.out.println(dog.age);

//        Dog dog1 = new Dog();
//        dog1.name = "小黑";
//        dog1.age = 2;
//        Dog dog2 = new Dog();
//        dog2.name = "大黄";
//        dog2.age = 6;
//        Dog dog3 = new Dog();
//        dog3.name = "小白";
//        dog3.age = 1;

//        Dog dog = new Dog();
//        dog.setName("小黑",4);
//        System.out.println(dog.name);
//        System.out.println(dog.age);

//        Test kk = new Test();
//        kk.a();
    }

    public static void main2(String[] args) {
//        Dog.weight = 45;
//        Dog dog1 = new Dog();
//        System.out.println(dog1.weight);
//        Dog dog2 = new Dog();
//        System.out.println(dog2.weight);

//        static int a = 43;
    }
    //        Cat cat1 = new Cat("小黑", 5, 45.0);
//        System.out.println(Cat.name);
//        System.out.println(Cat.age);
//        System.out.println(Cat.weight);

    public static void main(String[] args) {
        Cat cat1 = new Cat();
        System.out.println(cat1.age);
        System.out.println(Cat.name);
        Cat.name = "小白";
        Cat cat2 = new Cat();
        System.out.println(Cat.name);
        System.out.println(cat2.age);
    }
}





















